package com.neuedu.hostp.entity;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotBlank;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Checkin implements Serializable {
	/**
	 * 入住编号
	 */
	private Integer id;
	/**
	 * 顾客编号
	 */
	@NotBlank(message="顾客id不能为空")
    private Integer customerId;
    /**
     * 入住时间
     */
    private Date checkInTime;
    /**
     * 退住时间
     */
    private String checkOutTime;
    /**
     * 床位编号
     */
    @NotBlank(message="床位id不能为空")
    private Integer bedId;

    private static final long serialVersionUID = 4569635377297139003L;
    
    public Checkin(@NotBlank(message = "顾客id不能为空") Integer customerId, Date checkInTime, String checkOutTime,
			@NotBlank(message = "床位id不能为空") Integer bedId) {
		this.customerId = customerId;
		this.checkInTime = checkInTime;
		this.checkOutTime = checkOutTime;
		this.bedId = bedId;
	}

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public Date getCheckInTime() {
        return checkInTime;
    }

    public void setCheckInTime(Date checkInTime) {
        this.checkInTime = checkInTime;
    }

    public String getCheckOutTime() {
        return checkOutTime;
    }

    public void setCheckOutTime(String checkOutTime) {
        this.checkOutTime = checkOutTime == null ? null : checkOutTime.trim();
    }

    public Integer getBedId() {
        return bedId;
    }

    public void setBedId(Integer bedId) {
        this.bedId = bedId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", customerId=").append(customerId);
        sb.append(", checkInTime=").append(checkInTime);
        sb.append(", checkOutTime=").append(checkOutTime);
        sb.append(", bedId=").append(bedId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

	
}